'\" te
.\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LIBRESOLV 3LIB "Aug 19, 2019"
.SH NAME
libresolv \- resolver library
.SH SYNOPSIS
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lresolv\fR \fB-lsocket\fR \fB-lnsl\fR [ \fIlibrary\fR... ]
#include <\fBsys/types.h\fR>
#include <\fBnetinet/in.h\fR>
#include <\fBarpa/nameser.h\fR>
#include <\fBresolv.h\fR>
#include <\fBnetdb.h\fR>
.fi

.SH DESCRIPTION
Functions in this library provide for creating, sending, and interpreting
packets to the Internet domain name servers.
.SH INTERFACES
The shared object \fBlibresolv.so.2\fR provides the public interfaces defined
below. See \fBIntro\fR(3) for additional information on shared object
interfaces.
.sp

.sp
.TS
l l
l l .
\fB__dn_skipname\fR	\fB__fp_query\fR
\fB__hostalias\fR	\fB__p_cdname\fR
\fB__p_class\fR	\fB__p_query\fR
\fB__p_time\fR	\fB__p_type\fR
\fB__putlong\fR	\fB_getlong\fR
\fB_getshort\fR	\fB_res\fR
\fBdn_comp\fR	\fBdn_expand\fR
\fBfp_resstat\fR	\fBh_errno\fR
\fBherror\fR	\fBhstrerror\fR
\fBres_hostalias\fR	\fBres_init\fR
\fBres_mkquery\fR	\fBres_nclose\fR
\fBres_ninit\fR	\fBres_nmkquery\fR
\fBres_nquery\fR	\fBres_nquerydomain\fR
\fBres_nsearch\fR	\fBres_nsend\fR
\fBres_nsendsigned\fR	\fBres_query\fR
\fBres_querydomain\fR	\fBres_search\fR
\fBres_send\fR	\fBres_update\fR
.TE

.sp
.LP
Programs are expected to use the aliases defined in  <\fBresolv.h\fR> rather
than calling the "__" prefixed procedures, as indicated in the following table.
Use of the routines in the first column is discouraged.
.sp

.sp
.TS
c c
l l .
\fBFUNCTION REFERENCED\fR	\fBALIAS TO USE\fR
\fB__dn_skipname\fR	\fBdn_skipname\fR
\fB__fp_query\fR	\fBfp_query\fR
\fB__putlong\fR	\fBputlong\fR
\fB__p_cdname\fR	\fBp_cdname\fR
\fB__p_class\fR	\fBp_class\fR
\fB__p_time\fR	\fBp_time\fR
\fB__p_type\fR	\fBp_type\fR
.TE

.SH FILES
.ne 2
.na
\fB/lib/libresolv.so.1\fR
.ad
.RS 26n
shared object for backward compatibility only
.RE

.sp
.ne 2
.na
\fB/lib/64/libresolv.so.1\fR
.ad
.RS 26n
64-bit shared object for backward compatibility only
.RE

.sp
.ne 2
.na
\fB/lib/libresolv.so.2\fR
.ad
.RS 26n
shared object
.RE

.sp
.ne 2
.na
\fB/lib/64/libresolv.so.2\fR
.ad
.RS 26n
64-bit shared object
.RE

.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard:  BIND 8.2.4
_
MT-Level	See \fBresolver\fR(3RESOLV)
.TE

.SH SEE ALSO
.BR pvs (1),
.BR Intro (3),
.BR resolver (3RESOLV),
.BR attributes (7)
